<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
  <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){alert(data);
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{
			return false;
		}
	}
  </script>
   <h1><a href="{:U('index')}">返回列表</a></h1>
   
    <form class="checkoutform" action="{:U('insert')}" method="post">
    <input type="hidden" name="type" value="{$type}"  />
    <input type="hidden" name="position" value="{$position}"  />
      <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr>
        <td align="right">标题</td>
        <td><label for="title"></label>
          <input name="title" type="text" id="title" value="{$info.title}" size="70" />
          </td>
      </tr>
         <tr>
           <td align="right">标题(英文)</td>
           <td><label for="link"></label>
             <input name="en_title" type="text" id="title2" value="{$info.en_title}" size="70" />
             <input name="id2" type="hidden" id="id2" value="{$info.id}" /></td>
         </tr>
         <tr>
           <td align="right">链接地址</td>
           <td><input name="link" type="text" id="title3" value="{$info.link}" size="70" /></td>
         </tr>
         <tr>
        <td align="right">父级</td>
        <td><select name="pid" id="pid">
          <option value="">请选择</option>
          <volist name="pid_list" id="vo">
            <option <eq name="vo['id']" value="$info['pid']">selected="selected"</eq> value="{$vo.id}">{$vo.title}</option>
            <volist name="vo['sub']" id="svo">
               <option <eq name="svo['id']" value="$info['pid']">selected="selected"</eq> value="{$svo.id}">{:getdeepstr($svo['deep'])}{$svo.title}</option>
            </volist>
          </volist>
        </select></td>
      </tr>
      
      </if>
      <tr>
        <td align="right">图片</td>
        <td><input name="img_url" type="hidden" value="{$info.img_url}" /><iframe width="400" height="40" scrolling="no" frameborder="0" src="{:U('upload')}"></iframe><img onclick="showImgBox(this);" src="{:getThumbPath($info['img_url'])}" id="img_url" height="40" /><a href="javascript:void(0);" onclick="del_img();">删除图片</a></td>
      </tr>
      <!--<tr>
        <td align="right">导航位置</td>
        <td><select name="position" id="position">
          <option value="top">顶部</option>
          <option value="bottom">底部</option>
          <option value="left">左边</option>
          <option value="right">右边</option>
          <option value="main">主导航(微信)</option>
        </select></td>
      </tr>-->
      <tr>
        <td align="right">是否新窗口打开</td>
        <td><label>
          <input name="target" type="radio" id="is_nav_8" value="_blank" />
          是</label>
          <label>
            <input name="target" type="radio" id="is_nav_9"  value="" checked="checked" />
          否</label></td>
      </tr>
      <!--<tr>
        <td align="right">导航类型</td>
        <td><label for="type"></label>
          <select name="type" id="type">
            <option value="pc">PC端网站</option>
            <option value="mobile">手机端网站</option>
            <option value="weixin">微信网站</option>
          </select></td>
      </tr>-->
      <tr>
        <td align="right">显示</td>
        <td><label>
          <input name="status" type="radio" id="is_nav_8" value="1" checked="checked" />
          是</label>
          <label>
            <input name="status" type="radio" id="is_nav_9" value="0" />
          否</label></td>
      </tr>
        <tr><td colspan="2" align="center"><button>提交</button></td>
        </tr>
      </table>
    </form>
  </div>
  <div class="clear"></div>
</div>
</body></html>